/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package NewPackege;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Hristina
 */
@Entity
@Table(name = "message_registration")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "MessageRegistration.findAll", query = "SELECT m FROM MessageRegistration m"),
    @NamedQuery(name = "MessageRegistration.findByIdMessageRegistration", query = "SELECT m FROM MessageRegistration m WHERE m.idMessageRegistration = :idMessageRegistration")})
public class MessageRegistration implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "idMessage_Registration")
    private Integer idMessageRegistration;

    public MessageRegistration() {
    }

    public MessageRegistration(Integer idMessageRegistration) {
        this.idMessageRegistration = idMessageRegistration;
    }

    public Integer getIdMessageRegistration() {
        return idMessageRegistration;
    }

    public void setIdMessageRegistration(Integer idMessageRegistration) {
        this.idMessageRegistration = idMessageRegistration;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idMessageRegistration != null ? idMessageRegistration.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MessageRegistration)) {
            return false;
        }
        MessageRegistration other = (MessageRegistration) object;
        if ((this.idMessageRegistration == null && other.idMessageRegistration != null) || (this.idMessageRegistration != null && !this.idMessageRegistration.equals(other.idMessageRegistration))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "NewPackege.MessageRegistration[ idMessageRegistration=" + idMessageRegistration + " ]";
    }
    
}
